//
//  BaseModel.m
//  OASystem
//
//  Created by zhoupengfei on 15/11/15.
//  Copyright © 2015年 zpf. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel
-(instancetype)initWitDictionary:(NSDictionary *)dict{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{}

+(NSMutableArray*)dataWithArray:(NSArray*)dataArray;{
    
    NSMutableArray * tempArray = [NSMutableArray array];
    for (id dict in dataArray) {
        [tempArray addObject:[[self alloc] initWitDictionary:dict]];
    }
    
    return tempArray;
}
@end
